package com.lyf.convert_x.strategy.stringStrategy;

/**
 * @program: com.lyf.convert_x.strategy.stringStrategy
 * @description: 驼峰命名转换
 * @author: GG-lyf
 * @create: 2024/10/28
 */
public class CamelCaseStringConverter implements StringConverterStrategy {

    @Override
    public String execute(String msg) {
        ClassCamelStringConverter classCamelStringFormat = new ClassCamelStringConverter();
        StringBuilder result = new StringBuilder(classCamelStringFormat.execute(msg));
        // 将首字母改为小写
        if (!result.toString().isEmpty()){
            result.replace(0,1,String.valueOf(result.charAt(0)).toLowerCase());
        }
        return result.toString();
    }
}
